import loadable from '@loadable/component';
const Login = loadable(()=>import("../views/Login/Login"));
const Home = loadable(()=>import("../views/Home/index"));
const FindRoom = loadable(()=>import("../views/Home/findRoom"));
const My = loadable(()=>import("../views/Home/my"));
const Release = loadable(()=>import("../views/Home/release"));
const News = loadable(()=>import("../views/Home/news"));
const Homes = loadable(()=>import("../views/Home/Homes"));
const CityList = loadable(()=>import("../views/CityList"));
const MapFindRoom = loadable(()=>import("../views/Map"));
const routes =[{
    path:"/login",
    component:Login
},{
    path:"/home",
    component:Home,
    children:[{
        path:'/home/homes',
        title:'首页',
        icon:'iconfont icon-wode',
        component:Homes
    },
    {
        path:'/home/findRoom',
        title:'找房',
        icon:'iconfont icon-xinfang',
        component:FindRoom
    },
    {
        path:'/home/release',
        title:'发布',
        icon:'iconfont icon-ershoufang',
        component:Release
    },
    {
        path:'/home/news',
        title:'消息',
        icon:'iconfont icon-zufang',
        component:News
    },
    {
        path:'/home/my',
        title:'我的',
        icon:'iconfont icon-wode',
        component:My,
        isLogin:true
    }]
},{
    path:"/citylist",
    component:CityList
},{
    path:"/map",
    component:MapFindRoom
},{
    from:"/",
    to:"/login"
}]
export default routes;